<?php
namespace app\api\validate;
use think\Validate;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/6 0006
 * Time: 下午 3:11
 */
class Doctor extends Validate
{
    protected $rule =   [
        'name' => 'require',               //收货人
        'age' => 'require',               //收货人
        'sex' => 'require',               //收货人
        'education' => 'require',               //收货人
        'wechat' => 'require',               //收货人
        'address' => 'require',               //收货人
        'is_experiences' => 'require',               //收货人
        'introduce_content' => 'require',               //收货人
        //'lngy' => 'require',               //收货人
        //'lngx' => 'require',               //收货人
        'phone' => 'require|regex:/^1[34578]\d{9}$/',               //省份
    ];

    protected $message  =   [
        'name.require' => '请填写姓名',
        'sex.require' => '请选择性别',
        'phone.require' => '请填写电话',
        'phone.regex' => '请填写正确格式的电话',
        'age.require' => '请填写年龄',
        'education.require' => '请填写学历',
        'wechat.require' => '请填写微信号',
        'address.require' => '请填写地址',
        'is_experiences.require' => '请选择是否有从业经验',
        'introduce_content.require' => '请填写个人介绍',
    ];
}